package co.fitstart.weapp.api.entity;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

import co.fitstart.entity.courseware.exercise.LissType;

/**
 * 家庭作业请求参数
 * @author haiyan_xiao
 *
 */
public class ExerciseRequest {

    private Integer homeworkFrequency;

    private List<LissType> lissTypes;

    private String otherLiss;

    private String hit;

    private String core;

    private String remark;

    public ExerciseRequest() {
        
    }

    /**
     * 请求数据是否有效
     * @return
     */
    public boolean isValid() {
        if(homeworkFrequency == null && (lissTypes == null || lissTypes.isEmpty()) && StringUtils.isBlank(otherLiss)
                && StringUtils.isBlank(hit) && StringUtils.isBlank(core)) {
            return false;
        } else {
            return true;
        }
    }

    /**
     * @return the homeworkFrequency
     */
    public Integer getHomeworkFrequency() {
        return homeworkFrequency;
    }

    /**
     * @param homeworkFrequency the homeworkFrequency to set
     */
    public void setHomeworkFrequency(Integer homeworkFrequency) {
        this.homeworkFrequency = homeworkFrequency;
    }

    /**
     * @return the lissTypes
     */
    public List<LissType> getLissTypes() {
        return lissTypes;
    }

    /**
     * @param lissTypes the lissTypes to set
     */
    public void setLissTypes(List<LissType> lissTypes) {
        this.lissTypes = lissTypes;
    }

    /**
     * @return the otherLiss
     */
    public String getOtherLiss() {
        return otherLiss;
    }

    /**
     * @param otherLiss the otherLiss to set
     */
    public void setOtherLiss(String otherLiss) {
        this.otherLiss = otherLiss;
    }

    /**
     * @return the hit
     */
    public String getHit() {
        return hit;
    }

    /**
     * @param hit the hit to set
     */
    public void setHit(String hit) {
        this.hit = hit;
    }

    /**
     * @return the core
     */
    public String getCore() {
        return core;
    }

    /**
     * @param core the core to set
     */
    public void setCore(String core) {
        this.core = core;
    }

    /**
     * @return the remark
     */
    public String getRemark() {
        return remark;
    }

    /**
     * @param remark the remark to set
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
